// * 手机号 11位 以1开头 第二个数为3-9 剩下9位为0-9 有严格开头和结尾
let reg1 = /^1[3-9]\d{9}$/
let number = '13723405366'
console.log(reg1.test(number))
// * qq
let reg2 = /^[1-9]\d{4,}$/
let qq = '13768'
console.log(reg2.test(qq))

// * 颜色 #后可以接3位也可以接6位
let reg3 = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/
let c1 = '#baf'
let c2 = '#012334'
let c3 = '123213'
console.log(reg3.test(c1)); // true
// * 邮箱 \w-匹配任意字母数字或连字符
let reg4 = /^[\w-]+@[\w-]+(\.[\w-]+)+$/
let mail = '1376736719@qq.com'
let mail2 = 's211231053@student.edu.cqupt.cn'
let mail3 = 's211231-053@student.edu.cqupt.cn'
console.log(reg4.test(mail2))
